import { axios } from "../../utils/request";

const api = {
    pageList: "/work/reportForm/pageList",
    save: "/work/reportForm/save",
    delete: "/work/reportForm/delete",
    submitReportForm: "/work/reportForm/submitReportForm",
    readReportForm: "/work/reportForm/readReportForm",
    returnReportForm: "/work/reportForm/returnReportForm"
};

/**
 * 列表
 */
export function pageList(parameter) {
  return axios({
    url: api.pageList,
    method: "get",
    params: parameter
  });
}

/**
 * 保存
 */
export function save(parameter) {
  return axios({
    url: api.save,
    method: "post",
    data: parameter
  });
}

/**
 * 删除
 */
export function deleteForm(parameter) {
  return axios({
    url: api.delete,
    method: "post",
    data: parameter
  });
}

/**
 * 报送报表
 */
export function submitReportForm(data) {
  return axios({
    url: api.submitReportForm,
    method: "post",
    data: data
  });
}

/**
 * 评阅报表
 */
export function readReportForm(data) {
  return axios({
    url: api.readReportForm,
    method: "post",
    data: data
  });
}

/**
 * 撤回报表
 */
export function returnReportForm(data) {
  return axios({
    url: api.returnReportForm,
    method: "post",
    data: data
  });
}